<?php
require_once '../config/login_db.php';
if(!isset($_SESSION))
{
session_start();
}
class Logout{
private $dbconnection = NULL;
private $session = NULL;
public function __construct(){
		$this->dbconnection = new Login_DB();
      $this->session =$_GET['id'];
      $this->logo();
       header('Location:http://localhost/miub/admin/login.php');
      
}
private function logo(){
	echo "\nupdate";
		$query = 'UPDATE  
			   admins
			  SET  
			   Session = NULL 
			  WHERE 
			   Session = \''. mysql_real_escape_string($this->session) .'\'
			  LIMIT 1;';
 
		$this->dbconnection->query(&$query);
		$_SESSION = array();
		session_destroy();
	}

}

$log=new Logout();

